Compiler Design


Q91.

Consider the grammar S \rightarrow ABCc \mid bc BA \rightarrow AB Bb \rightarrow bb Ab \rightarrow ab Aa \rightarrow aa Which of the following sentences can be derived by this grammar?
GateOverflow

Q92.

For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1, E2, and E3. \varepsilon is the empty string, $ indicates end of input, and, | separates alternate right hand sides of productions.S\rightarrow aAbB|bAaB|\varepsilon A\rightarrow S B\rightarrow S The FIRST and FOLLOW sets for the non-terminals A and B are
GateOverflow

Q93.

Which of the following statements are TRUE? I There exist parsing algorithms for some programming languages whose complexities are less than \theta (n^{3}). II A programming language which allows recursion can be implemented with static storage allocation. III No L-attributed definition can be evaluated in the framework of bottom-up parsing. IV Code improving transformations can be performed at both source language and intermediate code level.
GateOverflow

Q94.

For the grammar below, a partial LL(1) parsing table is also presented along with the grammar. Entries that need to be filled are indicated as E1, E2, and E3. \varepsilon is the empty string, $ indicates end of input, and, | separates alternate right hand sides of productions.S\rightarrow aAbB|bAaB|\varepsilon A\rightarrow S B\rightarrow S The appropriate entries for E1, E2, and E3 are
GateOverflow

Q95.

An LALR(1) parser for a grammar G can have shift-reduce (S-R) conflicts if and only if
GateOverflow

Q96.

Match the following:
GateOverflow

Q97.

Which of the following describes a handle (as applicable to LR-parsing) appropriately?
GateOverflow

Q98.

The grammar S\rightarrowaSa|bS|c is
GateOverflow

Q99.

Which of the following class of statement usually produces no executable code when compiled?
GateOverflow

Q100.

Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements: i. Static scope facilitates w1 bindings. ii. Dynamic scope requires w2 bindings. iii. Early bindings w3 execution efficiency. iv. Late bindings w4 execution efficiency. The right choices of wl, w2, w3 and w4 (in that order) are
GateOverflow